<div class="container-fluid">
  <a class='label label-info' href='/collection/list/'>专题列表</a>
  <a class='label label-success pull-right' href='/collection/add/'>新建</a>
  <div id='collection_list'>
    <table class='table  table-striped table-bordered'>
        <thead>
          <tr>
          <th style='width:20%;'>#ID</th>
          <th>#Collection</th>
          <th>#Description</th>
          <th>#Amount</th>
          <th>#Sort</th>
          <th style='width:10%;'>#OP</th>
          <th style='width:7%;'>#OP2</th>
          <th style='width:7%;'>#OP3</th>
          </tr>
        </thead>
        <tbody>
        <?php foreach ($collections as $c):?>
          <tr>
          <td><?php echo $c->id;?></td>
          <td><?php echo $c->name;?></td>
          <td><?php echo $c->description;?></td>
          <td>
            <span class='amount-<?php echo $c->id;?>' style='font-weight:900;color:red;font-size:18px;'><?php echo $c->amount;?></span>
          </td>
          <td>
            <span class='sort-<?php echo $c->id;?>' style='font-weight:900;color:green;font-size:18px;'><?php echo $c->sort;?></span>
            <a class='btn btn-mini pull-right sort_op' data-op='minus' data-collection-id='<?php echo $c->id;?>'><i class='icon-chevron-down'></i></a>
            <a class='btn btn-mini pull-right sort_op' data-op='plus' data-collection-id='<?php echo $c->id;?>'><i class='icon-chevron-up'></i></a>
          </td>
          <td>
            <div class="btn-group" data-toggle="buttons-radio">
              <button data-id='<?php echo $c->id;?>' type="button" class="enable btn btn-mini <?php if($c->status == 1) echo "active";?>">使用</button>
              <button data-id='<?php echo $c->id;?>' type="button" class="disable btn btn-mini <?php if($c->status == 0) echo "active";?>">禁用</button>
            </div>
          </td>
          <td><button data-id='<?php echo $c->id;?>' type='button' class='delete btn btn-mini btn-danger'>删除</button></td>
          <td><button data-id='<?php echo $c->id;?>' type='button' class='config btn btn-mini btn-primary'>设置</button></td>
          </tr>
        <?php endforeach;?>
        </tbody>
    </table>
  </div>
</div>
